Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

440
Vistas
How to fix "Vault location [kv/my-client-service] not resolvable: Not found" when I am trying to connect HashiCorp Vault using AWS IAM role?

I have been using HashiCorp Vault for six months now where my all the secrets from the configuration service. I was connecting all my client services using spring.cloud.config.token but the problem came when the vault token expires every 30 days or so. For lower environment, token expiry is acceptable as we can redeploy again and again but PRODUCTION, we cannot redeploy. Hence, it was decided that using AWS IAM role, one can connect to vault and there wont be any expiration.

I have followed this official link but I am facing the below issue when I am starting the application.

enter image description here

I have googled about it but didn't get a working solution.

I am using the below code in bootstrap.yml file in my client service (my-client-service)

bootstrap.yml

spring:
  application:
    name: my-client-service
  cloud:
    config:
      enabled: true
      uri:  'https://localhost:8080' 
    vault:
      enabled: true
      uri: 'https://localhost:8090'
      port: 443
      scheme: https
      namespace: 'vault-namespace/aus'
      authentication: AWS_IAM
      fail-fast: true
      aws-iam:
        role: aus-vault-role
        aws-path: aws
      generic:
        enabled: true
        backend: kv
        profile-separator: '/'
        default-context: my-client-service
        application-name: my-client-service
      config:
        order: -1000

Vault Authentication ARN to AWS

vault write auth/aws/config/sts/<account_number> sts_role=arn:aws:iam::<account_number>:role/role_name

Associate ARN to Vault Policies

I created a IAM Role for the same account that is mapped for a Vault role and policy and mapped each IAM Role to a Vault role and policy.

vault write auth/aws/role/<Vault Role> auth_type=iam \
              bound_iam_principal_arn=<Your AWS Role ARN> policies=<Vault policy list> max_ttl=500h

Am I missing anything? It would be great if I find any solutions to this issue. Thanks in advance!

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

I fixed this issue after updating my vault policy with the below configuration:

path "kv/*"
{
  capabilities = [ "read", "list"]
}

I was able to start my application with the vault properties getting fetched.

over 4 years ago · Santiago Trujillo Denunciar

0

I think the policy update in your case is apt:

path "kv/*"
{
  capabilities = [ "read", "list"]
}

Direct it to the correct path of your secrets will resolve your issue.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda